//
//  SN_OrderListCell.m
//  Shiyun_Newspaper
//
//  Created by Sylar on 2017/7/3.
//  Copyright © 2017年 ShiYun. All rights reserved.
//

#import "SN_OrderListCell.h"

@implementation SN_OrderListCell
{
    UILabel *title;
    UILabel *rightLabel;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self layoutCell];
    }
    return self;
}

- (void)layoutCell {
    
    title = [[UILabel alloc]initWithFrame:CGRectMake(15, 0, 250, 46)];
    [title setFont:[UIFont systemFontOfSize:16]];
    [title setTextColor:colorFromHex(@"979797")];
    
    [self.contentView addSubview:title];
    
    rightLabel = [[UILabel alloc]initWithFrame:CGRectMake(SCREENWIDTH - 115, 0, 100, 46)];
    [rightLabel setFont:[UIFont systemFontOfSize:16]];
    [rightLabel setTextColor:colorFromHex(@"979797")];
    [rightLabel setTextAlignment:NSTextAlignmentRight];
    
    [self.contentView addSubview:rightLabel];
    
    UIView *line = [[UIView alloc]initWithFrame:CGRectMake(15, 41.5, SCREENWIDTH, 0.5)];
    [line setBackgroundColor:colorFromHex(@"DEDEDE")];
    [self.contentView addSubview:line];
    
    
}

- (void)creatCell:(NSDictionary *)dict {
    
    title.text = [dict objectForKey:@"vipcentertime"];
    rightLabel.text = [dict objectForKey:@"name"];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
